from django.db import models
from goods.models import Goods

# Create your models here.
class order(models.Model):
    """
    订单
    """
    price = models.FloatField()
    status = models.IntegerField()
    CreateTime = models.DateTimeField(auto_created=True)
    PaymentTime = models.DateTimeField(auto_now=True)


class record(models.Model):
    """
    交易记录
    """
    Goods = models.ForeignKey(Goods)
    count = models.IntegerField()
    price = models.FloatField()
    order = models.ForeignKey(order, related_name='orderRecord')
